import {createRouter, createWebHistory} from 'vue-router'
import Index from "../pages/IndexPage.vue";
import Team from "../pages/TeamPage.vue";
import Search from "../pages/SearchPage.vue";
import UserEdit from "../pages/UserEditPage.vue";
import SearchResultPage from "../pages/SearchResultPage.vue";
import LoginPage from "../pages/LoginPage.vue";
import TeamAddPage from "../pages/TeamAddPage.vue";
import TeamUpdatePage from "../pages/TeamUpdatePage.vue";
import UserPage from "../pages/UserPage.vue";
import UserUpdatePage from "../pages/UserUpdatePage.vue";
import UserTeamPage from "../pages/UserTeamPage.vue";
import RegistgerPage from "../pages/RegistgerPage.vue";

const routes = [
    {path: '/', component: Index, name: '主页'},
    {path: '/team', component: Team, name: '队伍'},
    {path: '/team/add', component: TeamAddPage, name: '创建队伍'},
    {path: '/team/update', component: TeamUpdatePage, name: '更新队伍'},
    {path: '/self', component: UserPage, name: '我的'},
    {path: '/search', component: Search, name: '搜索页'},
    {path: '/user/searchResultPage', component: SearchResultPage, name: '搜索结果页'},
    {path: '/user/edit', component: UserEdit, name: '信息修改'},
    {path: '/login', component: LoginPage, name: '登录页'},
    {path: '/register', component: RegistgerPage, name: '注册页'},
    {path: '/user/team', component: UserTeamPage, name: '我的队伍'},
    {path: '/user/update', component: UserUpdatePage, name: '信息页'},


]
const router = createRouter({
    history: createWebHistory(),
    routes,
})
export default router